package com.school.recuirmentsystem.controller;

import com.school.recuirmentsystem.entity.Student;
import com.school.recuirmentsystem.service.StudentService;
import com.school.recuirmentsystem.vo.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/student")
public class StudentController {

    @Autowired
    StudentService studentService;

    @PostMapping("/student/save")
    public ResponseResult addStudent(@RequestBody Student student){
        this.studentService.insert(student);
        return ResponseResult.ok();
    }
//    @DeleteMapping("/student/delete")
//    public ResponseResult deleteStudent(@PathVariable int id){
//        this.studentService.deleteStudent(id);
//        return ResponseResult.ok();
//    }
//
//    @PutMapping("/student/update")
//    public ResponseResult updateStudent(@RequestBody Student student){
//        this.studentService.updateStudent(student);
//        return ResponseResult.ok();
//    }
//
//    @GetMapping("/student/findStudentById")
//    public ResponseResult findStudentById(@PathVariable int id){
//        this.studentService.findStudentById(id);
//        return ResponseResult.ok();
//    }

}
